Skip to content

fix(runs): free a run's name its killed launch left without run.json - #788

Merged
harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/orphan-run-folder
Dec 3, 2026
Merged

harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/orphan-run-folder

Conversation

@harenome

@harenome harenome commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #764

What

  • A launch marks (.reserved) and locks its folder until its first run.json.
  • Folders are made or taken over under a runs-root lock.
  • Taken over only with a free lock, the mark, no run.json and only pre-record files. Others stay, name refused; a file or link at the name is 409.
  • A folder that cannot be locked is a storage error (503).

Touches

  • execution.reserve, release, start_all.
  • web/execute.begin: drops its existence pre-check.

Verified

  • Route tests: killed launches (after the plan, empty part id) free the name; paused, live, older, unmarked, doubly reserved or unlockable ones are kept.
  • Backend and route suites; docs check.

Risk

  • A launch killed between making its folder and its mark (microseconds) keeps its name taken, as on main. Older versions' folders stay refused.

Agents

  • Claude Code, Opus 5.5

A launch marks and locks its run folder until its first record, deciding under the runs root's lock. A marked folder no live launch holds, with no record and only a launch's pre-record files, is taken over; any other is left alone. A folder that cannot be locked is a storage error; a file or link at the name takes it.

Closes ThinkFlowLab#764
@harenome
harenome marked this pull request as ready for review December 3, 2026 16:26
@github-actions github-actions Bot added the needs review Tests pass, no conflict, no verdict on its latest commit label Dec 3, 2026
@harenome
harenome merged commit 6ef1668 into ThinkFlowLab:main Dec 3, 2026
4 checks passed
@harenome
harenome deleted the fix/orphan-run-folder branch December 3, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Tests pass, no conflict, no verdict on its latest commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A run folder left without its run.json by a crash keeps its name taken and cannot be deleted

1 participant